import {createApp} from 'vue'
import App from '@/App.vue'
import router from '@/router'
import 'element-plus/theme-chalk/display.css';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import layer from '@layui/layer-vue';
import '@layui/layer-vue/lib/index.css';
import moment from 'moment'

const app = createApp(App)
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.config.globalProperties.$imgUrl = "http://117.72.35.5:9001/"
app.config.globalProperties.$moment = moment
app.config.globalProperties.$formatDate = (value) => {
    if (!value) return '';
    return moment(value).format('YYYY-DD-MM');
};
app.use(router).use(layer).use(ElementPlus).mount('#app')

